.TH std::moneypunct 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::moneypunct \- std::moneypunct

.SH Synopsis
   Defined in header <locale>
   template< class CharT, bool International = false >
   class moneypunct;

   The facet std::moneypunct encapsulates monetary value format preferences. Stream I/O
   manipulators std::get_money and std::put_money use std::moneypunct through
   std::money_get and std::money_put for parsing monetary value input and formatting
   monetary value output.

   std-moneypunct-inheritance.svg

                                   Inheritance diagram

.SH Specializations

   The standard library is guaranteed to provide the following specializations (they
   are required to be implemented by any locale object):

   Defined in header <locale>
   std::moneypunct<char>          provides equivalents of the "C" locale preferences
   std::moneypunct<wchar_t>       provides wide character equivalents of the "C" locale
                                  preferences
   std::moneypunct<char, true>    provides equivalents of the "C" locale preferences,
                                  with international currency symbols
   std::moneypunct<wchar_t, true> provides wide character equivalents of the "C" locale
                                  preferences, with international currency symbols

.SH Member types

   Member type Definition
   char_type   CharT
   string_type std::basic_string<CharT>

.SH Member functions

   constructor   constructs a new moneypunct facet
                 \fI(public member function)\fP
   decimal_point invokes do_decimal_point
                 \fI(public member function)\fP
   thousands_sep invokes do_thousands_sep
                 \fI(public member function)\fP
   grouping      invokes do_grouping
                 \fI(public member function)\fP
   curr_symbol   invokes do_curr_symbol
                 \fI(public member function)\fP
   positive_sign invokes do_positive_sign or do_negative_sign
   negative_sign \fI(public member function)\fP
   frac_digits   invokes do_frac_digits
                 \fI(public member function)\fP
   pos_format    invokes do_pos_format/do_neg_format
   neg_format    \fI(public member function)\fP

.SH Protected member functions

   destructor       destructs a moneypunct facet
                    \fI(protected member function)\fP
   do_decimal_point provides the character to use as decimal point
   \fB[virtual]\fP        \fI(virtual protected member function)\fP
   do_thousands_sep provides the character to use as thousands separator
   \fB[virtual]\fP        \fI(virtual protected member function)\fP
   do_grouping      provides the numbers of digits between each pair of thousands
   \fB[virtual]\fP        separators
                    \fI(virtual protected member function)\fP
   do_curr_symbol   provides the string to use as the currency identifier
   \fB[virtual]\fP        \fI(virtual protected member function)\fP
   do_positive_sign provides the string to indicate a positive or negative value
   do_negative_sign \fI(virtual protected member function)\fP
   \fB[virtual]\fP
   do_frac_digits   provides the number of digits to display after the decimal point
   \fB[virtual]\fP        \fI(virtual protected member function)\fP
   do_pos_format    provides the formatting pattern for currency values
   do_neg_format    \fI(virtual protected member function)\fP
   \fB[virtual]\fP

.SH Member constants

   Member                   Definition
   const bool intl (static) International

.SH Member objects

   static std::locale::id id id of the locale
                             \fI(public member object)\fP



Inherited from std::money_base

   Member type                                     Definition
   enum part { none, space, symbol, sign, value }; unscoped enumeration type
   struct pattern { char field[4]; };              the monetary format type

   Enumeration constant Definition
   none                 whitespace is permitted but not required except in the last
                        position, where whitespace is not permitted
   space                one or more whitespace characters are required
   symbol               the sequence of characters returned by
                        std::moneypunct::curr_symbol is required
                        the first of the characters returned by
   sign                 std::moneypunct::positive_sign or
                        std::moneypunct::negative_sign is required
   value                the absolute numeric monetary value is required

.SH See also

   money_base        defines monetary formatting patterns
                     \fI(class)\fP
                     represents the system-supplied std::moneypunct for the named
   moneypunct_byname locale
                     \fI(class template)\fP
                     parses and constructs a monetary value from an input character
   money_get         sequence
                     \fI(class template)\fP
   money_put         formats a monetary value for output as a character sequence
                     \fI(class template)\fP
